package orm

// ISession 真正操作数据库底层的接口, 是 Session 的接口。
type ISession interface {
	Close()
	Bind(bind interface{}) ISession
	Begin() (err error)
	Rollback() (err error)
	Commit() (err error)
	TX(closer ...func(session ISession) error) (err error)
	Query(sqlStr string, args ...interface{}) ([]Data, error) // 原生查询SQL
	Exec(sqlStr string, args ...interface{}) (int64, error) // 原生执行SQL
	GetIEngine() IEngine
	LastInsertId() int64
	LastSql() string
	GetTableName() (string, error)
	SetIBinder(ib IBinder)
	GetIBinder() IBinder
	SetUnion(u interface{})
	GetUnion() interface{}
	SetTransaction(b bool)
	GetTransaction() bool
	GetBindAll() []Data
	GetErr() error
}
